#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QPushButton* button=new QPushButton(this);
    button->setText("获取坐标");
    connect(button,&QPushButton::clicked,this,[this](){
        qDebug()<<this->geometry();//不带边框位置
        qDebug()<<this->frameGeometry();//带边框位置
    });

}

Widget::~Widget()
{
    delete ui;
}

